Previous Book Contents Book Index Next

Inside Macintosh: Open Transport /
Chapter 2 - Providers / Providers Reference
Functions


Controlling a Provider's Mode of Operation

A provider's mode of operation determines whether the provider runs synchronously or asynchronously, whether the provider blocks, and whether the provider acknowledges sends.

By default, providers created synchronously operate in synchronous mode; providers created asynchronously operate in asynchronous mode. You can use the OTSetSynchronous or OTSetAsynchronous function to specify how provider functions should execute. You can use the OTCanMakeSyncCall function to find out whether Open Transport permits synchronous calls at a given moment. You can find out a provider's current mode of execution by calling the OTIsSynchronous function. If synchronous functions are in progress on a provider, you can cancel all of them by calling the OTCancelSynchronousCalls function.

A provider's blocking status governs how provider functions proceed when they cannot read or write data without waiting. If a provider blocks, it waits until it is able to read or write data, which might require that it wait indefinitely. If a provider does not block, the function used to read or write data returns an error, specifying why it could not complete the operation. You can set a provider's blocking status by calling the OTSetBlocking or OTSetNonBlocking function. You can find out a provider's current blocking status by calling the OTIsNonBlocking function. By default, providers do not block. For more information about blocking, see the section "Setting a Provider's Blocking Status," beginning on page 2-10.

You can use the OTAckSends or OTDontAckSends function to specify whether a provider acknowledges sends. This determines how a provider handles data that you send and whether it informs you when it has sent the data. To determine whether a provider acknowledges sends, you call the OTIsAckingSends function. By default, providers do not acknowledge sends. Mapper and individual service providers like AppleTalk and TCP/IP ignore the setting of this attribute. However, the behavior of endpoint functions that send data is affected by the endpoint provider's acknowledgment status.


Subtopics
OTSetSynchronous
OTSetAsynchronous
OTIsSynchronous
OTCancelSynchronousCalls
OTSetBlocking
OTSetNonBlocking
OTIsNonBlocking
OTAckSends
OTDontAckSends
OTIsAckingSends

Previous Book Contents Book Index Next

© Apple Computer, Inc.
15 AUG 1996